<template>
  <div>
    <h1>isRef的使用</h1>
    <h1 v-text="num"></h1>
    <button @click="num++">自增</button>
    <button @click="add">自增</button>
  </div>
</template>

<script setup>
// isRef: 判断一个变量是否为一个 ref 对象。
import { ref, isRef } from "vue";
let num = ref(1000);
let x = 110;
let add = () => {
  num.value++;
};

console.log(isRef(num));
console.log(isRef(num.value));
console.log(isRef(x));
</script>

<style lang="scss" scoped>
</style>